<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title></title>
<%@ include file="/WEB-INF/views/include/easyui.jsp"%>

</head>
<body style="font-family: '微软雅黑'">
<div id="tb2" style="padding:5px;height:auto">
        
</div>
<table id="dg2"></table> 
<script type="text/javascript">
var dg2;
$(function(){   
	var obj=$("#searchFrom").serializeObject();
	
	dg2=$('#dg2').datagrid({    
	method: "get",
    url:'${ctx}/userIntegral/userIntegralDetail?uid=${uid}&beginDate=' + obj.beginDate + '&endDate=' + obj.endDate,
    queryParams:{
		sort: 'recordTime', 
		order: 'desc'
		},
    fit : true,
	fitColumns : true,
	border : false,
	striped:true,
	idField : 'uid',
	pagination:true,
	rownumbers:true,
	pageNumber:1,
	pageSize : 10,
	pageList : [ 10, 20, 30, 40, 50 ],
	singleSelect:true,
    columns:[[    
		{field:'title',title:'说明',sortable:false,width:60,formatter:function(value,rowData,rowIndex){
			return value;
		}},
		{field:'score',title:'积分',sortable:false,align:'center',width:20,formatter:function(value,rowData,rowIndex){
			if(rowData.incomeType == '0') {
				return "<span style='color: red;'><b>+"+rowData.score+"</b></span>";
			} else {
				return "<span style='color: gray;'><b>-"+rowData.score+"</b></span>";
			}
		}},
		{field:'recordTime',title:'时间',sortable:false,align:'center',width:34,formatter:function(value,rowData,rowIndex){
			return formatTime(value);
		}}
    ]],
    enableHeaderClickMenu: false,
    enableHeaderContextMenu: false,
    enableRowContextMenu: false,
    toolbar:'#tb2'
	});
});

</script>
</body>
</html>